/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bean;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author Alex
 */
public class Connect
{
    public Connect(){}

    public static Connection getConnection()
    {
        Connection con = null;
        try {
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;Database=ResultDeclarationBoard;user=sa;password=123456;");

        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return con;
    }

    public Connection getconnection() {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}

